/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-03-25
 * Time:18:19
 */
import java.util.Arrays;
public class Test {
    public static int[]  transform(int[] arr){
        //以数组为参数, 循环将数组中的每个元素 乘以 2
        for (int i = 0; i < arr.length; i++) {
            arr[i]=arr[i]*2;
        }
        return arr;
    }
    public static void main(String[] args) {
        int[] arr={1,2,3};//静态存储
        //将数组以字符串的形式输出

        String newArr=Arrays.toString(transform(arr));
        System.out.println(newArr);

    }
}
